FROM maven:3.5-jdk-8 AS build
WORKDIR /app
COPY . .
COPY pom.xml .
RUN mvn -f pom.xml clean package

FROM openjdk:8-alpine
WORKDIR /home/ruoyi
COPY --from=build /app/ruoyi-admin/target/*.jar /home/ruoyi/
EXPOSE 8080
ENTRYPOINT ["java","-jar","ruoyi-admin.jar"]